package com.foucus.myfouces.Base;

import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.Window;
import android.view.WindowManager;

/**
 * Created by yf-06 on 2017/7/1.
 */

public class BaseFragment extends Fragment {
    public static final int LOAD = 0;//加载
    public static final int REFRESH = 1;// 刷新
    public static final int MORE = 2;// 更多
    public static int page = 0; //页

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initWindow();
    }

    private void initWindow() {


        final int sdk = Build.VERSION.SDK_INT;
        Window window = getActivity().getWindow();
        WindowManager.LayoutParams params = window.getAttributes();

        if (sdk >= Build.VERSION_CODES.KITKAT) {
            int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
            // 设置透明状态栏
            if ((params.flags & bits) == 0) {
                params.flags |= bits;
                window.setAttributes(params);
            }
        }

    }

}
